home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Views / Standard Views / GrowBox.cp < prev    next >
Encoding:
Text File  |  1997-06-28  |  865 b   |  58 lines  |  [TEXT/CWIE]

  1. // GrowBox.cp
  2.  
  3. #ifndef GrowBox_h
  4. #include "GrowBox.h"
  5. #endif
  6. #ifndef ViewMap_h
  7. #include "ViewMap.h"
  8. #endif
  9. #ifndef WindowFocus_h
  10. #include "WindowFocus.h"
  11. #endif
  12. #ifndef GrafPortObject_h
  13. #include "GrafPortObject.h"
  14. #endif
  15.  
  16. GrowBox::GrowBox( WindowFocus& focus )
  17.   : Activator( focus )
  18.   {
  19.   }
  20.  
  21. void GrowBox::Activate()
  22.   {
  23.     Redraw();
  24.   }
  25.  
  26. void GrowBox::Deactivate()
  27.   {
  28.     Redraw();
  29.   }
  30.  
  31. void GrowBox::Draw( const ViewMap& map ) const
  32.   {
  33.     Assert( map.Bounds().BottomRight() == map.Port().LocalBounds().BottomRight() );
  34.     Assert( map.Bounds().Width() == 15 );
  35.     Assert( map.Bounds().Height() == 15 );
  36.     DrawGrowIcon( &map.Port() );
  37.   }
  38.  
  39. uint16 GrowBox::MinimumWidth() const
  40.   {
  41.     return 15;
  42.   }
  43.  
  44. uint16 GrowBox::MinimumHeight() const
  45.   {
  46.     return 15;
  47.   }
  48.  
  49. uint16 GrowBox::MaximumWidth() const
  50.   {
  51.     return 15;
  52.   }
  53.  
  54. uint16 GrowBox::MaximumHeight() const
  55.   {
  56.     return 15;
  57.   }
  58.